/*
 ============================================================================
 Page	     : 332
 Name        : fgets1.c
 Date	     : 20210406
 Author      : Hbue 18060333
 Copyright   : Your copyright notice
 Description : 使用fgets()和fputs()
 ============================================================================
 */

#include <stdio.h>
#define STLEN 31

int main(void)
{
	char words[STLEN];

	puts("Enter a string, please.");
	fgets(words, STLEN, stdin);
	printf("Your string twice (puts(), then fputs()):\n");
	puts(words);
	fputs(words, stdout);
	puts("Enter another string, please.");
	fgets(words, STLEN, stdin);
	printf("Your string twice (puts(), then fputs()):\n");
	puts(words);
	fputs(words, stdout);
	puts("\nDone.");

	return 0;
}

